package cate.game.role.pvp.teampvp.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBTeamPvp;
import cate.game.pvp.teampvp.dto.TeamPvpMatchData;

@ClientMsg(title = "提前进布阵的请求")
public class TeamPvpAheadPositionReq implements MsgInput {
    @Override
    public void execute(GameBody game, ClientContext cc) {
        TeamPvpMatchData data = game.pvp.teamPvp.aheadPosition(cc.getRole());
        if (data == null) {
            game.notice.message(cc.getRole(), "提前进入布阵失败");
            return;
        }
        cc.sendNow(new TeamPvpAheadPositionResp(data));
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBTeamPvp.AHEAD_POSITION_REQ;
    }
}
